//
//  MySubjectCell.m
//  BusinessMarket
//
//  Created by Michael Li on 2018/11/1.
//  Copyright © 2018年 Michael Li. All rights reserved.
//

#import "MySubjectCell.h"
#import "SubjectModel.h"
#import "SpecialRecommendationModel.h"
#import "UIView+WebCache.h"
@interface MySubjectCell()
@property (weak, nonatomic) IBOutlet UIView *veiw;
@property (weak, nonatomic) IBOutlet UIImageView *iv;
@property (weak, nonatomic) IBOutlet UILabel *titleL;
@property (weak, nonatomic) IBOutlet UILabel *countL;

@end
@implementation MySubjectCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.veiw.layer.masksToBounds = YES;
    self.veiw.layer.cornerRadius = 3;
    self.veiw.layer.borderColor  = kLineColor.CGColor;
    self.veiw.layer.borderWidth  = 1;
    self.iv.layer.masksToBounds = YES;
    self.iv.layer.cornerRadius = 3;

}

- (void)setSubjectModel:(SpecialRecommendationModel *)subjectModel
{
    _subjectModel = subjectModel;
    [self.iv performSelector:@selector(sd_setImageWithURL:) withObject:[NSURL URLWithString:subjectModel.icon] afterDelay:1 inModes:@[NSDefaultRunLoopMode]];
    self.titleL.text = subjectModel.title;
    self.countL.text = [NSString stringWithFormat:@"共包含%ld条内容",subjectModel.idSize];
    
}

@end
